package com.leyi.inception.api.enums;

public enum  IfBackupEnum {

    BACKUP("1","备份"),
    NOT_BACKUP("0","不备份"),

    ;


    private String key;

    private String value;

    IfBackupEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static IfBackupEnum getByKey(Integer key) {
        for (IfBackupEnum codeEnum : values()) {
            if (key.equals(codeEnum.getKey())) {
                return codeEnum;
            }
        }
        return null;
    }

}
